import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入模板的全局样式
import '@/styles/index.scss'
import App from './App.vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import allGloballComponents from '@/components'
//svg插件需要配置代码
import 'virtual:svg-icons-register'
import Router from './router'
import pinia from './store'

const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn,
})

// 注册自定义全局组件
app.use(allGloballComponents)

app.use(Router)
app.use(pinia)
// 引入路由鉴权文件；引入后代码才会生效
import './permission'

app.mount('#app')
